Skip to content

fix: open target URLs in default browser when running standalone PWA#1

Open
simpgps wants to merge 3 commits into
masterfrom
simpgps-patch-1
Open

fix: open target URLs in default browser when running standalone PWA#1
simpgps wants to merge 3 commits into
masterfrom
simpgps-patch-1

Conversation

@simpgps

@simpgps simpgps commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Fixes trovu#329.

When Trovu is run as a standalone PWA, redirecting search targets via window.location.href traps the user inside the PWA container.

Opening a new tab via window.open after an await statement is blocked by browser popup blockers because the transient user activation context is lost across asynchronous boundaries.

This PR resolves this by opening a blank window (about:blank) synchronously inside the user gesture event handler, and subsequently redirecting it to the target URL once resolved, or closing it if redirection is aborted.

/claim trovu#329

@simpgps

simpgps commented Jun 9, 2026

Copy link
Copy Markdown
Owner Author

I am a human who is writing this comment, not an AI.

simpgps and others added 2 commits June 10, 2026 06:28
Use x-safari-https/http on iOS standalone PWAs instead of window.open, which only opens the in-app browser without Safari UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@simpgps simpgps force-pushed the simpgps-patch-1 branch from fab996f to 1bc0b7d Compare June 9, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Open target URLs not in PWA but in default browser

1 participant